<?php
    session_start();
    
    if(isset($_SESSION['lang']))
        $lang = $_SESSION['lang'];

    session_unset();
    session_destroy();
    session_start();

    if($lang == 'en')
        $_SESSION['lang'] = 'en';
    else
        $_SESSION['lang'] = 'de';

    header('Location: index.php');
    exit();
?>